﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class CameraCtrl : MonoBehaviour
{
    public GameObject player;
    private Vector3 offest;
    // Start is called before the first frame update
    void Start()
    {
        player = GameObject.Find("Player").gameObject;
        offest = transform.position - player.transform.position;
    }


    // Update is called once per frame
    void Update()
    {

    }
    void LateUpdate()
    {
        transform.position = player.transform.position + offest;
    }
}